var itineraireTableWithConsole;

function itineraireReport(text) { 
    itineraireTableWithConsole.log(text);
}

function init_itineraire_table_reporting() {
    itineraireTableWithConsole = new TableWithConsole('#table_itineraire', '#console');
    itineraireTableWithConsole.initTable([
        {"sTitle": "Libell&eacute; du smartlock"},
        {"sTitle": "Origine"},
        {"sTitle": "Destination"},
        {"sTitle": "Duree"},
        {"sTitle": "Distance"},
    ], function(data) {
         
    });
}

function load_itineraire_table_reporting(result) { 
    var t = [];
    for (var i = 0; i < result.length; i++) {
        var tmp = [];
        var elt = result[i];
        tmp.push(elt.smartlock.reference);
        tmp.push(elt.origin);
        tmp.push(elt.destination); 
        tmp.push(elt.durationtxt); 
        tmp.push(elt.distance); 
        t.push(tmp);
    }
    itineraireTableWithConsole.loadTable(t);
}




